<!doctype html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="UTF-8">
    <title>楼栋管理</title>
    <link href="../lib/layui/css/layui.css" rel="stylesheet" type="text/css" media="screen"/>
    <script src="../lib/jquery-3.3.1.min.js" type="text/javascript"></script>
    <script src="../lib/layui/layui.js" type="text/javascript"></script>
    <script src="../js/basicinfo/basicBlock.js" type="text/javascript"></script>
    <script src="../lib/exportExcelUtil.js" type="text/javascript"></script>
</head>
<body class="layui-layout-body" style="background-color:white;">
        <div class="query" style="padding-top: 10px; padding-left: 10px;">
            <div class="layui-inline">
                <div class="layui-form">
                    <div class="layui-input-inline">
                        楼栋名称：
                    </div>
                    <div class="layui-input-inline">
                        <input id="searchBlockName"  class="layui-input" autocomplete="off" placeholder="请输入楼栋名称进行搜索">
                    </div>
                </div>
            </div>
            <button class="layui-btn " lay-submit lay-filter="search_block"  id="reloadBlock">查询</button>
            <button class="layui-btn"  type="button" onclick="reloadBlock()">刷新</button>
            <button class="layui-btn"  type="button" onclick="addBlock()">添加</button>
<!--            <button class="layui-btn"  type="button" onclick="pubProd()">删除</button>-->
            <button class="layui-btn"  type="button" id="sync" >同步</button>
            <button class="layui-btn"  type="button" id="import" >批量导入</button>
            <button class="layui-btn"  type="button" id="exportAll" >导出全部</button>
        </div>
        <div id="content">
            <table class="layui-table" id="basicBlockTable"  lay-filter="basicBlockTable"></table>
        </div>
<!--    </div>-->

    <!-- 楼栋信息增加页面 -->
    <div style="display:none;" id="blockAdd">
        <form id="product_form" lay-filter="product_form" class="layui-form"  action="" style="padding: 20px;">
            <input type="hidden" id="blockId" name="blockId">
            <div class="layui-form-item">
                <div class="layui-inline">
                    <label class="layui-form-label">楼栋名称<span style="color:red">*</span></label>
                    <div class="layui-input-inline">
                        <input type="text" name="blockName" placeholder="" lay-verify="required" autocomplete="off"
                               class="layui-input">
                    </div>
                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-inline">
                    <label class="layui-form-label">楼栋编号<span style="color:red">*</span></label>
                    <div class="layui-input-inline">
                        <input type="text" name="blockNo"  placeholder="" lay-verify="required" autocomplete="off"
                               class="layui-input">
                    </div>
                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-inline">
                    <label class="layui-form-label">类型<span style="color:red">*</span></label>
                    <div class="layui-input-inline">
                        <select name="blockType" lay-filter="community" >
                            <option value="2">楼栋</option>
                            <option value="1">出入口</option>
                        </select>
                    </div>
                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-inline">
                    <label class="layui-form-label">楼栋描述<span style="color:red">*</span></label>
                    <div class="layui-input-inline">
                        <textarea id="blockDesc" style="width:300px; height: 100px;" placeholder="描述最长100字" name="blockDesc"  ></textarea>
                    </div>
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">楼栋地址<span style="color:red">*</span></label>
                <div class="layui-input-block">
                    <textarea id="blockAddress" style="width:300px; height: 100px;" placeholder="地址最长100字" name="blockAddress"  ></textarea>
                </div>
            </div>

            <div class="layui-form-item">
                <div class="layui-inline">
                    <label class="layui-form-label">楼栋层数<span style="color:red">*</span></label>
                    <div class="layui-input-inline">
                        <input type="number"  name="blockFloor" placeholder="输入1-200之间的数字" min="1" max="200" lay-verify="required" autocomplete="off"
                               class="layui-input">
                    </div>
                </div>
            </div>

            <div class="layui-form-item mt30">
                <div class="layui-input-block">
                    <button class="layui-btn" lay-submit="" id="block_form" lay-filter="block_form">提交</button>
                    <button class="layui-btn" lay-submit="" id="block_up" lay-filter="block_up">更新</button>
                    <button type="reset" class="layui-btn layui-btn-primary">重置</button>
                </div>
            </div>
        </form>
    </div>

    <!--  批量导入  -->
    <div id="upload" style="display: none">
        <div>
            <p style="display: none;"><a id="downButton" target="_blank" href="../web/acs/downfile/blockTemplate.xlsx">1.下载模板  </a></p>
        </div>
        <form class="layui-form" style="margin-top:5%;margin-left: 1%">
            <input style="display: none" id="id">
            <div class="layui-input-inline" style="margin-left: 20px;margin-top: 2px;">
                <input type="text" id="file_name" name="file" lay-verify="required" style="width: 350px"  readonly autocomplete="off" class="layui-input">
            </div>
            <button type="button" class="layui-btn" id="uploadProductBtn">
                <i class="layui-icon">&#xe67c;</i>上传文件
            </button>
            <input type="file" style="display:none" class="layui-btn" id="uploadExcel">
            <button class="layui-btn" id="upload_form" lay-submit="" lay-filter="upload_form">提交</button>
            <button class="layui-btn" id="down_block_template" type="button"  >模板下载</button>
        </form>
    </div>

<!--</div>-->

</body>

</html>